/*
 * @Author: C.
 * @Date: 2023-04-04 14:13:45
 */
import { defHttp } from '/@/utils/http/axios';

enum Api {
  GetDepartmentList = '/department/get_all',
  AddDepartment = '/department/add',
  DeleteDepartment = '/department/delete',
}

// /api/department/get_all
// 获取所有部门
export const getDepartmentList = () => {
  return defHttp.get({ url: Api.GetDepartmentList });
};
// POST /api/department/add
// 新增部门
export const addDepartment = (params: any) => {
  return defHttp.post({ url: Api.AddDepartment, params });
};
// POST /api/department/delete
// 删除部门
export const deleteDepartment = (params: any) => {
  return defHttp.post({ url: Api.DeleteDepartment, params });
};
